/*
    赋值运算符
        = += -= *= /= %=
 */

public class OperatorDemo04 {
    public static void main(String[] args) {
        int i = 10;
    //基础实现
        i += 8;
        System.out.println(i);
        i -= 3;
        System.out.println(i);
        i *= 9;
        System.out.println(i);
        i /= 6;
        System.out.println(i);
        i %= 11;
        System.out.println(i);

    //注意1 short型 自动转换int
        short s = 18;
        s += 3;
        System.out.println(s);

    //注意2 short型 将将要溢出
        // interesting!  127 + 1 = -128
        byte s1 = 123;
        s1 = (byte)(s1 + 5);
        System.out.println(s1);
    }

}
